package cn.lyq.card.data.src


class MyMsg {

    constructor(message: String) {
        this.message = message
    }

    constructor(message: String, expend: Any?) {
        this.message = message
        this.expend = expend
    }

    var message = ""
    var expend: Any? = null

    fun getMsg(): String {
        return if (message.isNotEmpty()) {
            message
        } else {
            expend.toString()
        }
    }
}

fun String.toMsg() = MyMsg(this)